package luccy.util;

public abstract class PackageUtil {

	private PackageUtil() {
	}

	public static String getPackage(final Class c) {
		AssertionUtil.assertNotNull(c);
		final Package p = c.getPackage();
		if (p == null) {
			final String name = c.getName();
			return name.substring(0, name.lastIndexOf("."));
		}
		return p.getName();
	}
}
